unit uFrmCashGamePlayerOut;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons, gnugettext, umainutils, Keyboard;

type
  TFrmCashGamePlayerOut = class(TForm)
    pnl_Buttons: TPanel;
    btn_Save: TSpeedButton;
    btn_Close: TSpeedButton;
    Panel1: TPanel;
    TouchKeyboard1: TTouchKeyboard;
    edt_OutputValue: TLabeledEdit;
    Label1: TLabel;
    procedure btn_SaveClick(Sender: TObject);
    procedure btn_CloseClick(Sender: TObject);
  private
    { Private declarations }
    m_TicketID: string;
  public
    { Public declarations }
    procedure ShowForm(TicketID: string);
  end;

var
  FrmCashGamePlayerOut: TFrmCashGamePlayerOut;

implementation

uses uFrmMainLPT;
{$R *.dfm}

procedure TFrmCashGamePlayerOut.btn_CloseClick(Sender: TObject);
begin
close();
end;

procedure TFrmCashGamePlayerOut.btn_SaveClick(Sender: TObject);
begin
  if edt_OutputValue.Text = '' then
  begin
    ShowMessage(_('Write player output value.'));
  end
  else
  begin
    UpdateDataToDB('CASH_GAME_TICKETS', 'OUTPUT_VALUE=''' + edt_OutputValue.Text + '''' + ',OUT_DATETIME=(SELECT SYSDATE FROM DUAL)', 'ID=' + m_TicketID);
    close();
  end;
end;

procedure TFrmCashGamePlayerOut.ShowForm(TicketID: string);
begin
  m_TicketID := TicketID;
  edt_OutputValue.Text := '';
  Label1.Caption := Currency_Symbol;
  ShowModal;
end;

end.
